package com.bjdd.jdy.entity;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2017/5/12.
 */

public class BankBean {

    /**
     * bankId : 1
     * bankName : 农业银行
     * bankIcon : null
     * enabled : true
     */

    private int bankId;
    private String bankName;
    private String bankIcon;
    private boolean enabled;

    public static BankBean objectFromData(String str) {

        return new Gson().fromJson(str, BankBean.class);
    }

    public static List<BankBean> arrayBankBeanFromData(String str) {

        Type listType = new TypeToken<ArrayList<BankBean>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public int getBankId() {
        return bankId;
    }

    public void setBankId(int bankId) {
        this.bankId = bankId;
    }

    public String getBankName() {
        return bankName;
    }

    public void setBankName(String bankName) {
        this.bankName = bankName;
    }

    public String getBankIcon() {
        return bankIcon;
    }

    public void setBankIcon(String bankIcon) {
        this.bankIcon = bankIcon;
    }

    public boolean isEnabled() {
        return enabled;
    }

    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
    }
}
